This invention relates to image enhancement during image processing. More particularly, the present invention relates to a method and an apparatus for sharpening edges of an image.
Monochromatic imaging systems seek to provide sharp edges and good background separation. When copying, printing or reproducing a document or image using a monochromatic imaging system, it is usually desirable to smooth photographic regions and to sharpen text regions. Text is sharpened by accentuating a contrast between a bordering dark region of text and an adjacent light background. Most imaging systems process images by first separating photographic regions from text regions, by means of a process called auto-separation, and then performing separate enhancement algorithms on the text regions and the photographic regions that have been identified by the auto-separation.
In processing black and white images (i.e. “monochromatic images”), systems treat image data as an array of discrete gray level pixels (“picture elements”). Each pixel is associated with a position in the image and an 8-bit digital value that encodes an intensity value in the range from 0 to 255. Each intensity value represents a gray level of the monochromatic image, ranging from absolute black (0) to absolute white (255). Alternately, the image data can be represented as a 12-bit digital value, comprising 4096 possible intensity values, ranging from 0 (black) to 4095 (white). In color images, the color data for the image may also be encoded in intensity values for the pixels. However with color images, each pixel is encoded by three intensity values, ranging from 0 to 255, or from 0 to 4095, which combine to define an output color for the pixel.
When a scanning device scans an image to capture image data, the scanning device corrupts the image and produces a blurring effect at edges within the image. An “edge” is an interface or boundary between two distinct regions in the image, such black text and a lighter background next to the text. This blurring effect, known as “scanner fringe”, occurs due to the scanner's inability to optically isolate one pixel in the image at a time. This effect is illustrated in FIG. 1, which shows a typical scan measurement for a single pixel. A measurement in intensity of a high-intensity pixel 6 “ripples”to areas 7, 8 surrounding the pixel. When the scanner attempts to measure the intensity of a pixel in the image, neighboring pixels influence and affect the measurement. As a result, there is not a sharp transition between regions of low intensity pixels and regions of high intensity pixels. Rather, there is a fuzzy and blurred transition. For example, a low intensity pixel that borders a region of high intensity appears to the scanner to have a higher intensity, due to the influence of neighboring pixels in the high intensity region.
A second problem arises when the image is printed on a print medium with a half-tone printer. The half-tone printer operates in a binary mode, where the printer either prints a dot at a pixel position or leaves the pixel position blank. As such, the grey scale intensity values (which may range for instance from 0 to 255) must be mapped to one of two values. One of the values corresponds to a value for printing a dot and the other value is for not printing a dot. To effect this mapping, a print threshold is typically used. If the measured intensity level of a pixel is less than the print threshold, the output intensity value of the pixel is converted to 0 (absolute black) and the printer places a dot at the pixel position in the output image. If the measured intensity value of the pixel is greater than the print threshold, the output intensity value is converted to 255 (absolute white), and no dot is printed at the pixel location.
Error diffusion is a technique commonly used during this half-tone printing process for reducing error and accurately reproducing an average intensity level for the image. Error diffusion examines each pixel, determines an error value for the pixel and forwards the error to a selected collection of neighboring pixels in accordance with a weighting scheme. The error is the difference between the gray level (0–255) pixel value of the input digital image and the output intensity value (either 255 or 0) of what is printed. In this manner, the error resulting from the conversion is diffused to surrounding pixels, and the average intensity (the gray level) of the original image is maintained in the converted image.
Although error diffusion may help to decrease image corruption during half-tone printing, the printer still corrupts the image at the edges of the image. Edges become blurred as the printer attempts to match the gray level at a transition between a region of low intensity pixels and a region of high intensity pixels, such as the border between text and a lighter background, as commonly found at edges of an image. The error diffuser may diffuse error to a light side of an edge region, and place ink where no dot should be placed.